import './App.css';
import React from 'react';
import { BrowserRouter, useLocation } from "react-router-dom";
import RouterList from './routers/index';
import Tab from './components/common/tab';

function Breadcrumb () {
  let location = useLocation()
  let ShowTabs = false
  if (location.pathname == '/' || location.pathname == "/user/base/index") {
    ShowTabs = true
  } else {
    ShowTabs = false
  }

  return (
    <div>
      {ShowTabs ? <Tab /> : ''}
    </div>
  )
}

class App extends React.Component {
  constructor (props) {
    super(props)
  }

  render () {
    return (
      <BrowserRouter>
        <RouterList />
        <Breadcrumb />
      </BrowserRouter>
    )
  }
}

export default App;